<?php
/**
 * 
 * Get locale strings by class
 * 
 * @category Abovo
 * 
 * @package Abovo_View_Helper
 * 
 * @author Antti Holvikari <anttih@gmail.com>
 * 
 */

/**
 * 
 * Get locale strings by class
 * 
 * @category Abovo
 * 
 * @package Abovo_View_Helper
 * 
 */
class Abovo_View_Helper_GetTextClass extends Solar_View_Helper {
    
    /**
     * 
     * Returns a localized string by class, with escaping applied.
     * 
     * @param string $class Class name
     * 
     * @param string $key Locale key
     * 
     * @param array $replace If an array, will call vsprintf() on the
     * localized string using the replacements in the array.
     * 
     * @return string The translated locale string
     * 
     */
    public function getTextClass($class, $key, $num = 1, $replace = null)
    {
        return $this->_view->escape(
            Solar::$locale->fetch($class, $key, $num, $replace)
        );
    }
}
